<template>
    <div id="p_tasktoday" class="p_task">
        <div style="display:flex;border-bottom: 1px solid #eee;">
            <div ref="dayScrol" style="width: 100%;overflow:scroll;-webkit-overflow-scrolling:touch;background-color:#fff;">
              <tab class="day" :style="{width: allDays.length*40 +'px'}" bar-active-color="#37aefc" :line-width="0">
                <tab-item :selected="daySelect === it" @on-item-click="onDay(it)" active-class="active-tab" :class="{next: it>today,today:it==today,notask:hasDays.indexOf(it)==-1}" :value="it" v-for="(it, index) in allDays" :key="index">{{it|dayOnly}}</tab-item>  
              </tab>    
            </div>
            <button-tab class="timeBtn">
                <button-tab-item @on-item-click="changeTime" selected>{{showMonth}}</button-tab-item>
            </button-tab>
        </div>
    <actionsheet v-model="showEditBtn" :menus="asBtnCurr" show-cancel @on-click-menu="chooseEdit"></actionsheet>
    <popup-picker v-show="false" :show.sync="showTimeNeed" @on-hide="onTimeNeed" title="任务时长" v-model="timeNeed" :data="timeArr" :display-format="format"></popup-picker>
    <sticky v-show="mode_vip" scroll-box="vux_view_box_body" :offset="46">
        <button-tab v-model="editType"  style="padding-left:10%;padding-right:10%; padding-top:4px; padding-bottom:4px;">
            <button-tab-item @on-item-click="onEditType(0)">优先</button-tab-item>
            <button-tab-item @on-item-click="onEditType(1)">评估</button-tab-item>
            <button-tab-item @on-item-click="onEditType(2)">执行</button-tab-item>
            <button-tab-item @on-item-click="onEditType(3)">总结</button-tab-item>
            <button-tab-item @on-item-click="onEditType(4)">归档</button-tab-item>
        </button-tab>
    </sticky> 
    <x-progress :percent="taskPercent" :show-cancel="false"></x-progress>
    <scroller v-model="pullStatus" lock-x scrollbar-y use-pulldown :pulldown-config="pullDownConfig2" @on-pulldown-loading="changeVip" :height="scrollHeight" ref="scroll" >
        <group class="group0">                
            <div v-if="todayArr.length==0" style="text-align:center;" ><img src="/static/z39h5/img/none.png" width="200" /></div>
            <swipeout>
                <swipeout-item @on-open="actionOpen(item, index,2)" v-for="(item, index) in todayArr" :key="index" ref="action" >
                    <div slot="right-menu">
                        <swipeout-button @click.native="goTask(item,index)" type="primary">详情</swipeout-button>
                        <swipeout-button @click.native="onDelClick(item,index)" type="default">取消</swipeout-button>
                    </div>
                    <div slot="left-menu">
                        <swipeout-button type="primary">{{item.state!='done'?'完成':'取消完成'}}</swipeout-button>
                    </div>
                    <div slot="content" class="vux-1px-t" v-bind:class="{task_going:item.state=='started',task_done:item.state=='done',task_toggle:item.state=='toggle',task_cancle:item.state=='cancelled',task_curr: taskCurr == item}">
                        <cell @click.native="onEdit(item,index)" :tags="item.tags" :filterStr="daySelect" :title="showTaskTitle(item)" :value="item.duration" :inline-desc="(item.state!=''||(item.tags&&item.tags.need))?showTaskDesc1(item):item.desc">
                            <div slot="icon" @click.stop="playtask(item,'today')">
                                  <img :src="showIcons(item)" style="width:50px;height:50px;"/>
                                  <span class="taskCount">{{index+1 + "/" + tasksLen}}</span>
                              </div>
                        </cell>
                    </div>
                </swipeout-item>
            </swipeout>
        </group>
    </scroller>
    <t-summary :task="taskCurr " :show.sync="showSummary"></t-summary>
    <flags :task="taskCurr" v-on:flaghide="onflagHide"  :show.sync="showAddTag" ></flags>

    </div>
</template>
<script>
import moment from "moment";

import { taskAndTag  } from "../mixin";
import { help  } from "../mixinApp";
import { logic  } from "../mixinTaskLogic";

import TSummary from "./TSummary.vue"
import Flags from "./Flags.vue"
import TaskAdd from "../TaskAdd";

import api from '../../api';
import {
    mapState,
    mapActions
} from 'vuex'

// let  planBtnArr = [ {    label: '置顶[默认9点]',    value: 'top'  }, 
//                 {    label: '上移[自动排时]',    value: 'pre'  }, 
//                 {    label: '设定[固定时间]',    value: 'set'  }, 
//                 {    label: '取消[固定时间]',    value: 'reset'  }];
let  planBtnArr = [ {    label: '置顶',    value: 'top'  }, 
                {    label: '上移',    value: 'pre'  }];
var lastTaskLen,showTaskIntval ;

import {
    TransferDomDirective as TransferDom,XProgress,Actionsheet,PopupPicker,
    Toast,Swipeout,SwipeoutItem,SwipeoutButton,XButton,Group,Cell,Tab,TabItem,Badge,
    Box,XInput,XTextarea,Flexbox, FlexboxItem,Datetime,Scroller,ButtonTab,ButtonTabItem,Sticky
} from 'vux'

export default {
    directives: {TransferDom},
    components: {
        TSummary,Flags,XProgress,Actionsheet,PopupPicker,TaskAdd,
    Toast,Swipeout,SwipeoutItem,SwipeoutButton,XButton,Group,Cell,Tab,TabItem,Badge,
    Box,XInput,XTextarea,Flexbox, FlexboxItem,Datetime,Scroller,ButtonTab,ButtonTabItem,Sticky
    },
    mixins: [taskAndTag,help,logic],    
    computed: {        
        testTodays: function() {  //测试今日数据立刻改变
            var tempDay = this.daySelect ; // moment().format("YYYY-MM-DD");
            return this.taskAll.filter(task=> {return task.tags && task.tags["due"] && task.tags["due"].indexOf(tempDay) >-1} );
        },
        ...mapState({
            isNavShow: state => state.vux.isNavShow,
            uid: state => state.vux.uid,
            minDate: state => state.z39.minDate,
            maxDate: state => state.z39.maxDate,
            taskAll: state => state.z39.taskAll,
            tagDic: state => state.z39.tagDic,
            daysDic: state => state.z39.daysDic,
            days: state => state.z39.days,
            
            tagitems: state => state.z39.tagitems,
            tagitemDic: state => state.z39.tagitemDic,
            dayDueChange: state => state.z39.dayDueChange,
            taskRunId: state => state.z39.taskRunId,
            taskRunTitle: state => state.z39.taskRunTitle,
        })
    },
    watch: {                
        "taskAll":{handler(){
                    this.resort();
                },  deep: true },
        "daySelect":function(){
            this.resort();
        },
        "tagitems":function(){
            var temp=[] ;
            var len = this.tagitems.length ;
            for(var i=0;i<= len-1 ;i++){
                var item = this.tagitems[i] ;
                temp.push({key:item.key,name:item.name}) ;
            }
            this.flagAllArr = temp;
        },
        "daysDic":function(){
            // this.hasDays =  this.daysDic[this.showMonth] || [] ;
            // console.log("in daysDic:",this.hasDays);
        },
        "days":function(){
            this.resetDays();
            // console.log("in days :",this.hasDays,this.allDays)
        },
        "hasDays":function(){
            console.log("days change in")
            this.$nextTick(() => {
                this.autoPos();
            }); 
        },
        "uid":function(){
            // this.getInitData();
            this.initPage();
        },
    },
    activated () {
        console.log("activated---------")
    },
    created() {
        this.scrollHeight = this.isNavShow?"-132":(-132+55+"");

        let val = this.showMonth || moment().format("YYYY-MM") ;
        this.showMonth = val;
        this.$store.commit({ type: "z39/showMonth", value: val });
        this.today = moment().format("YYYY-MM-DD");
		this.initDefaultDays();  
        this.getLocalData();
        // document.querySelector('#vux_view_box_body').scrollTop = 0 ;
        console.log("daySelect" , this.daySelect) ;
    },
    deactivated:function(){        
        if(this.showEditBtn) this.showEditBtn = false; 
        if(this.showTimeNeed) this.showTimeNeed = false; 
        if(this.showEditBtn) this.showEditBtn = false; 
        // if(this.showSummary) this.showSummary = false; 
        this.$vux && this.$vux.bus && this.$vux.bus.$emit('taskAddVisible', false);
        if(this.showAddTag) this.showAddTag = false; 
    },
    filters: {  
        dayMin: function (month) {  
          return month.replace("-","")  
        }  ,
        dayOnly: function (day) {  
          var dayMon = moment(day) ;
          var value = dayMon.day();
          var todayStr = moment().format("YYYY-MM-DD");
          var dayDic = {1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",0:"日"};
          var show = "" ;
          if( day == todayStr){
            show = "今";
          }else if(day < todayStr){
            show =  (value == 0 ||value ==6) ?dayDic[value] : dayMon.date() ;
          }else{
            show = dayMon.date() ;
          }
          return show ; 
        }  
    }  ,
    mounted: function() {
        this.initPage();
        this.$vux && this.$vux.bus && this.$vux.bus.$on('loginDone', this.initPage);
    },
    methods: {   
        getLocalData(){
            var vip = localStorage.getItem("todayVip");
            if( vip && this.today!=vip) localStorage.removeItem("todayVip");
            else if(vip) this.changeVip();//  this.mode_vip = true ;
            var type = localStorage.getItem("todayEditType");
            if(type && this.today!=type.split("_")[0]) localStorage.removeItem("todayEditType");
            else if(type) this.editType = parseInt(type.split("_")[1]) ;
        },
		getInitData(){
			if( _.isEmpty(this.tagitemDic)&& this.uid >0  ){
				this.tagitemsGet();
			}
            // this.initPage();
		},
        initPage(){
			if( this.uid == 0 ){
                this.initDefaultDays() ;
                this.resort();
                return ;
            }
			this.onDay( this.daySelect||this.today );
            this.daysGet({type:1,month:this.showMonth}) ;
            this.getInitData();
            if(this.dayDueChange){
                this.resort();
                this.$store.commit({type:"z39/dayDueChange",dayDueChange:false});
            }
            this.$nextTick(() => {
                this.$refs.scroll.reset()
            })
            this.resetDays();
        },
        initDefaultDays(){
            this.allDays = this.getMonthDays(this.showMonth);
            // this.$store.commit({ type: "z39/daysDic", days: days, month: this.today });
        },
        getMonthDays(month){
            var target = month? moment(month):moment();
            month = target.format("YYYY-MM");
            var dayNum = target.daysInMonth();
            var temp ,days=[] ;
            for(var i=0;i< dayNum ;i++){
                temp = (i+1) ;
                temp = temp > 9?temp:"0"+temp ;
                days.push(`${month}-${temp}`);
            }
            // console.log("days:",days);
            return days ;
        },
        changePercent(){
            console.log("changePercent");
            var temp = this.todayArr ;
            var tempDone = temp.filter(task=> {return task.state == 'done'} );
            var doneNum = tempDone.length  ;
            this.taskPercent = temp.length>0?Math.floor(100*doneNum/temp.length):0;
            var usedTotal = 0 ;
            var used ,usedStr ;
            temp.forEach(item=>{
                used = item.tags.used || item.tags.usedCalc || 0 ;
                usedTotal += moment.duration(used).valueOf() ;
            })
			if(usedTotal==0) return ; //时间为0不提示.
			if( usedTotal == this.usedTotal ) return ;
			this.usedTotal = usedTotal ;
            usedStr = moment("2018-01-11").add(usedTotal).format("HH:mm");
            if(this.$route.path == "/m_task") this.$vux.toast.text(`总耗时 ${usedStr}`,'center');			
			this.$vux.bus.$emit('todayNum', {today:doneNum!=temp.length});
            console.log("usedStr:",usedStr,);
        },
        resort(){
            var tempDay = this.daySelect ; // moment().format("YYYY-MM-DD");
            var res = [] ;
            var temp =  this.taskAll.filter(task=> {
                // console.log( _.clone(task));
                return task.uid == this.uid && task.parid == null &&task.tags && task.tags["due"] && task.tags["due"].indexOf(tempDay) >-1} );
            if( this.sortStr == undefined || this.sortStr.length == 0 ){
                res = temp ;
            }else{
                let sortArr = this.sortStr.split(",") ;
                var len = sortArr.length ;
                var sortDic = {} ;
                for(var i=0;i<= len-1 ;i++){
                    var id = sortArr[i] ;
                    sortDic["id"+id] = i ;
                }
                for (var j = temp.length - 1; j >= 0; j--) {
                    var task = temp[j] ;
                    var tempi = sortDic["id"+task.id] ;
                    if( tempi != undefined ){
                        res[tempi] = temp.splice(j,1)[0] ;
                    }
                };
                res = res.concat( temp );
                res = _.compact( res )  ;
            }
            // var taskLen = res.length ;
            // if(taskLen>lastTaskLen && !showTaskIntval){
            //     let _this =this ;
            //     this.$vux && this.$vux.bus && this.$vux.bus.$emit('todayNum', {num:taskLen,show:true});
            //     showTaskIntval = setTimeout(()=>{_this.$vux.bus.$emit('todayNum', {num:taskLen,show:false}),showTaskIntval = null},2000);
            // }
            // lastTaskLen = taskLen ;
            this.todayArr = res ;
            this.tasksLen = res.length ;
            this.changePercent();
            // console.log("resort mounted tempDay",tempDay,res.length,this.taskAll.length,_.clone(this.taskAll));
            this.$nextTick(() => {
                try{this.$refs.scroll.reset({top: 0})}catch(e){}
                try{document.querySelector('#vux_view_box_body').scrollTop = 0 ;}catch(e){}
                console.log("nextTick reset")
            })
        },
        sortdataAdd(sdata){
            let _this = this;
            api.sortdayAdd(sdata).then(data => {
                if(data.errno !=0) return this.$vux.toast.show({text: "设置失败",type: 'warn'});
                    data = data.data;
                    this.sortStr = sdata.sorts ;
                    console.log(data) ;
                
            })
        },
        daysGet(sdata){
            api.days(sdata).then(data => {
                if(data.errno !=0) return this.$vux.toast.show({text: data.errmsg ,type: 'warn'});
				data = data.data;
                // this.hasDays = data ;
				this.$store.commit({ type: "z39/daysDic", days: data, month: this.showMonth });                    
                
            })
        },
        onEdit(item,index){
            this.taskCurr = item ;
            let type = this.editType ;
            this.tongji("task","taskbtns"+type,"today","show");
            console.log("need",this.showTimeNeed,_.clone(item).tags.due,_.clone(item));
            switch(type){
                case 0:
                    this.showEditBtn = true ;
                    this.asBtnCurr = planBtnArr ;
                    break;
                case 1:
                    let taskneed = item.tags["need"] ;
                    taskneed = taskneed?(formatTimeHM(taskneed)):''; 
                    this.timeNeed = (taskneed&&taskneed.indexOf(":")>-1)?taskneed.split(":"): this.timeNeed ;
                    this.showTimeNeed = true ;
                    break;
                case 2:
                    this.showEditBtn = true ;
                    this.asBtnCurr = this.getTaskBtns(item) ;
                    break;
                case 3:
                    // this.showSummary = true ;
                    this.$vux.bus.$emit('taskAddExtOnce', {parid:item.id,state:"done",tags:{summary:""}});
                    this.$vux.bus.$emit('taskAddVisible', true);
                    break;
                case 4:
                    //在tabitemclick 中.
                    this.showAddTag = true ;
                    break;
                default: //从添加状态点击任务,直接进入查看模式.

                    console.error("index:",index);
                    break;
            }
        },
        changeTime(){
            let _this = this;
            var todayStr = moment().format("YYYY-MM-DD") ;
            this.$vux.datetime.show({
                cancelText: '取消',
                confirmText: '确定',
                format: 'YYYY-MM',
                startDate: this.minDate ,
                endDate: this.maxDate ,
                value: this.showMonth ,
                onConfirm (val) {                      
                    _this.$store.commit({ type: "z39/showMonth", value: val });
                    console.log("monthChange",val) ;
                    _this.showMonth = val ;
                    _this.daysGet({type:1,month:val}) ;
                    _this.tongji("task","month","today","show");
                    _this.$vux.toast.show({text: "点日期切换任务" ,type: 'info'});
                },
                onShow () {
                  console.log('plugin show')
                },
                onHide () {
                  console.log('plugin hide')
                }
              })
        },
        onDay(day){
            if(this.daySelect == day) return ;
            this.daySelect = day ;
            // this.taskAddExt.state = "due";
            // this.taskAddExt.tags = {due:day};
            this.taskAddExt = {state:"due",tags:{due:day}};
			this.$store.commit({ type: "z39/addTaskExt", value: {state:"due",tags:{due:day}} });
            console.log("day",day,this.taskAddExt);
            if(day.length>10) day = day.substring(0,10);
            // this.tasksGet({uid:1,key:"due:"+ this.daySelect }) ;
            this.sortdayGet(day).then(data=>{
                this.sortStr = data.sorts ;
                this.resort();
            });
            this.tongji("task","day","today","set");
        },
        onTimeNeed(value){
            this.showTimeNeed=false ;
            if(value){
                var t =this.timeNeed;
                let time = t.join(":");
                this.doTagSet(this.taskCurr,"need",t[0]*3600+t[1]*60) ;
                this.tongji("task","need","today",time);
            }
        },
        doTaskCancle(){
            this.editType = 2 ;
            this.stateAdd=false ;
        },
        actionOpen(item,index,option){            
            let dir = "" , target , arrIndex = index ;
            target = this.$refs.action[index] ;
                dir = target.direction ;
            if( dir == "left"){
                if( item.state == "done"){
                    this.doTaskEdit(item,"").then(data => {
                        this.changePercent();
                    }) ;
                    this.tongji("task","cancelled","today","swipe");
                }else{
                    this.doTaskEdit(item,"done",moment().format("YYYY-MM-DD HH:mm")).then(data => {
                        this.changePercent();
                    }) ;
                    this.tongji("task","done","today","swipe");
                }
                setTimeout(() => {
                    target.close();
                }, 200);                
            }
        },
        goTask(item,index){ // 进入任务详情
            this.$router.push(`/taskDetail/${item.id}`) ;
        },
        onDelClick( item, index) {
            this.doTaskEdit(item,"cancelled",moment().format("YYYY-MM-DD HH:mm"));
            this.tongji("task","cancelled","today","swipe");
        },
        resetInput(){
            this.taskTitle = "";
            this.taskDesc = "" ;
        },
        getData: function() {
            
        },
        saveSort(){
            var ids = [] ;
            var len = this.todayArr.length ;
            for(var i=0;i<= len-1 ;i++){
                var item = this.todayArr[i] ;
                ids.push(item.id) ;
            }
            this.sortdataAdd({day:this.daySelect,sorts: ids.join(",")});
            // console.log(ids.join(","));
        },
        addCustomFlag(type){
            console.log("addCustomFlag");
        },
        loadNext(){
            console.log("loadNext");
            if( this.pageIndex < this.pageTotal ){
                this.pageIndex ++ ;
                this.pageShowNum = this.pageIndex * this.pageNumOne ;
                // console.log("pageShowNum",this.pageShowNum) ;
                this.$refs.scroll.donePullup() ;
            }
			this.checkClosePullup();
        },
		checkClosePullup(){
            this.$refs.scroll.reset();
			if( this.pageIndex >= this.pageTotal){
				setTimeout(() => {
					this.$refs.scroll.disablePullup()
				}, 100)	
			}
		},
        changeVip(){
            this.$nextTick(() => {
                setTimeout(() => {
                    // this.scrollHeight = "-170" ;
                    this.scrollHeight = this.isNavShow?"-170":(-170+55+"");
                    this.$refs.scroll.reset();                    
                    this.$refs.scroll.donePulldown()
                  }, 10)
                setTimeout(() => {
                    this.mode_vip = true ;
                    localStorage.setItem("todayVip",moment().format("YYYY-MM-DD"));
                    this.tongji("task","vip","today","show");
                }, 200)                
            })
        },
        autoPos(){
            try{
                var ox = document.querySelector("#p_tasktoday div>div .vux-tab-selected").offsetLeft ;
                var ctn = document.querySelector("#p_tasktoday div>div") ;
                var x = ox - ctn.scrollLeft ;
                console.log("w x",x,ox,ctn.scrollLeft);
                if(x <0 || x> ctn.offsetWidth ) ctn.scrollLeft = ox;
            }catch(e){}
        },
        resetDays(){
            this.hasDays =  this.daysDic[this.showMonth] || [] ;
            this.allDays = this.getMonthDays(this.showMonth) ;
        },
        onEditType(val){
            localStorage.setItem("todayEditType",moment().format("YYYY-MM-DD")+"_"+val);
            this.stateAdd=false;
        },
        onflagHide:function(val) {
            this.showAddTag = val ;
        },
        onFlagExt:function(val){
            var tags = val.tags ;
            var temp = [];
            var filtersFlag = ["created", "started", "need", "done", "toggle", "cancelled", "due", "used", "usedCalc", "to", "repeat", "critical"] ;
            for(var key in tags){
                if(filtersFlag.indexOf(key) == -1){
                    temp.push({key:key,name: this.tagitemDic[key]});
                }
            }
            this.flagUse = temp ;
            // console.log("onFlagExt:",val);
        },
    },
    data() {
        return {
            showEditBtn:false ,            
              asBtnCurr:[],
            editType:2,
            // days: [1,2,3,4,5,6,7,10,11,12,13,14],
            timeNeed:["00","30"],
            timeArr:[['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23'],['05','10','15','20','25','30','35','40','45','50','55']] ,
              format: function (value, name) {
                return `${value[0]}:${value[1]}`
              },
              showTimeNeed:false ,
              showPopupPicker: false,
              showSummary:false ,
              taskCurr:{title:""},
              taskDoing:null,
              sortStr:"",
              todayArr:[] ,
            showMonth:'',
            daySelect:"",
            stateAdd:false ,
            taskTitle:"",
            taskDesc:"",
              smyTitle:"",
              smydesc:"",
              smydesc1:"",
              smydesc2:"",
              smydesc3:"",
              smydesc4:"",
              smydesc5:"" ,
              showAddTag:false,
            today:'' ,
            taskPercent:0,
			usedTotal:0,
            mode_vip:false,
            pageIndex: 1 ,
            pageTotal: 2 ,
            pageShowNum:15,
            pageNumOne: 15 ,
              pullupConfig2: {
                content: '上拉加载更多',
                downContent: '松开进行加载',
                upContent: '上拉加载更多',
                loadingContent: '加载中...'
              },
            pullStatus: {
             pullupStatus: 'default',
             pulldownStatus: 'default'
            },
            pullDownConfig2: {
                content: '松开切换模式',
                downContent: 'VIP高级模式',
                upContent: '下拉进入高级模式',
                loadingContent: '切换中...'
              },
            scrollHeight:"-132" , //"-167"
            hasDays:[],
            allDays:[],
            tasksLen:0,
            taskAddExt:{},
            showTaskNum:false,
        }
    }
}

</script>
<style scoped>

.day-item {
  border: 1px solid #ececec;
  padding: 8px 15px;
}
.day-item-selected {
  border: 1px solid green;
}


#p_tasktoday .vux-button-group{
    background-color: #fff; 
    padding-top: 1px;
}
#p_tasktoday .timeBtn{width:78px;}
#p_tasktoday .vux-tab {
    padding:2px 6px ;
    height: 32px;
}
#p_tasktoday .vux-tab .vux-tab-item{
    background: #fff;
    line-height: 28px;    font-size: 16px;
}
#p_tasktoday .vux-tab .vux-tab-selected {
    background: rgba(0, 169, 255, 0.24);border-radius: 6px;
}
#p_tasktoday .vux-tab .next {
    background: rgba(238, 238, 238, 0.7);
}

.checkScroll{height: 200px;    overflow: scroll;}

.demo1-item {
    border: 1px solid #027ab7;
    padding: 5px;
    border-radius: 4px;
    margin: 0 0 4px 4px;
    min-width: 40px;
    max-width: 100px;
    text-align: center;
    font-size: 12px;
}

.demo1-item-selected {
    border: 1px solid #8e8e8e;
    background-color: #10aeff;
}

.customChe {
    border: 1px solid #b2b2b2;
    background-color: #ffffff;
    width: 40px;
    text-align: center;
}
#p_tasktoday .taskCount{background-color:#10aeff87}
#p_tasktoday .task_going .taskCount,#p_tasktoday .task_cancle .taskCount{color: #000000}
</style>
<style>
#p_tasktoday .active {
    background-color: rgba(16, 174, 255, 0.54);
}

#p_tasktoday .weui-search-bar:before {
    height: 0;
    border-top: 0;
}
/*#p_tasktoday .vux-tab .vux-tab-item{
    background: #fff;
}*/
#p_tasktoday .day  .vux-tab-selected {
    background: #eee;
    border-radius: 4px;
}
#p_tasktoday .notask {
    text-decoration: line-through;
}



</style>
